From: Ewan Mellor Date: Thu, 22 Mar 2007 14:27:05 +0000 (+0000) Subject: Fix marshalling of Xen-API maps with non-string keys. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15277^2~28^2~9 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=830355957c45d8053be2cf4058eb7a53732c4510;p=xen.git Fix marshalling of Xen-API maps with non-string keys. Signed-off-by: Tom Wilkie --- diff --git a/tools/python/xen/util/xmlrpclib2.py b/tools/python/xen/util/xmlrpclib2.py index 3bdd717de2..de2b16e469 100644 --- a/tools/python/xen/util/xmlrpclib2.py +++ b/tools/python/xen/util/xmlrpclib2.py @@ -54,9 +54,10 @@ def stringify(value): (isinstance(value, int) and not isinstance(value, bool)): return str(value) elif isinstance(value, dict): + new_value = {} for k, v in value.items(): - value[k] = stringify(v) - return value + new_value[stringify(k)] = stringify(v) + return new_value elif isinstance(value, (tuple, list)): return [stringify(v) for v in value] else: